$('#tickets').html("<%= escape_javascript(render 'admin/users/tickets') %>");
//$('.ticket-stats').html("<%= j render 'admin/topics/ticket_stats' %>");
$('.ticket-stats').html("<%= j render partial: 'admin/users/user_filter' %>");
$('#user-nav').html("<%= j render 'admin/users/user_info' if @user %>");
// $('#user-info').html("<%= j render 'admin/users/user_info_horizontal' if @user %>");
$('#ticket-page-title').show().html("<%= j user_header %>");

// TODO: replace this hack with a better direct link or modal slide over
<% if params[:mode] == 'edit' %>$('.edit-user-button').click();<% end %>

// Empty ticket search field and hidden-xs
$('q').val('');

// Update timestamps
$('.last-active time[data-time-ago]').timeago();

// Send ping to GA
ga('send', 'pageview');

// jQuery hook
Helpy.ready();
Helpy.track();
Helpy.logHistory();

// RTL changes?
<%= "Helpy.rtl();" if rtl? %>
